import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Rcap from '../views/Rcap.vue'
import Ckrc from '../views/Ckrc.vue'
import Zjrc from '../views/Zjrc.vue'
import Search from '../views/Search.vue'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/rcap',
      name: 'rcap',
      component: Rcap,
    },
    {
      path: '/ckrc',
      name: 'ckrc',
      component: Ckrc,
    },
    {
      path: '/zjrc',
      name: 'zjrc',
      component: Zjrc,
    },
    {
      path: '/search',
      name: 'search',
      component: Search,
      meta: {
        keepAlive: true
      }
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
  ],
})

export default router
